package com.xtc.config;

import com.xtc.event.MyApplicationEvent;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.event.EventListener;

/**
 * @author Administrator
 */
@Configuration
public class EventConfiguration {

    /**
     * 监听 MyApplicationEvent
     * @param event
     */
    @EventListener
    public void onEvent(MyApplicationEvent event) {
        System.out.println("监听事件 : " + event);
    }
}
